#if !defined(_SBYTE_H)
#define _SBYTE_H

#include "SSimpleValue.h"
#include "boost/lexical_cast.hpp"
#include <boost/regex.hpp>

CREATE_ALIAS( SByte )

/**
 *   Class used to store a byte variable.
 */
class DECLARATION_DLL SByte : public SSimpleValue
{
	/** The byte value. */
	unsigned char value;

	/**
	 *   Create a SByte variable with a specific value.
	 */
	SByte(unsigned char value)
	{
		Set(value);
	}

	public:

		/**
		 *	Get the variable type.
		 */ 
		virtual SType GetType() const
		{
			return STypeByte;
		}

		/**
		 *   Set the byte value.
		 */
		virtual void Set(unsigned char value) 
		{
			this->value = value;
		}
		
		/**
		 *   Get the byte value.
		 */
		virtual unsigned char Get() 
		{ 
			return value; 
		}

		/**
		 * Returns a string representation of the value.
		 */
		virtual string ToString();

		/**
		 * Returns a string representation of the value in a specific format.
		 */
		virtual string ToString(string format);

		/**
		 *   Factory method to create a SByte variable.
		 */
		static SByteSp Create(unsigned char value);

		/**
		 *   Factory method to create a SByte variable from a string.
		 */
		static SByteSp Parse(string s);

};

#endif  //_SBYTE_H
